package test.excutes;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import test.beanClasses.HelloWorld;
import test.beanClasses.HelloWorld2;

/**
 * Created by kz on 2017/5/14.
 */
public class App {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        HelloWorld obj = (HelloWorld) context.getBean("helloBean");
        obj.printHello();

        HelloWorld2 obj2 = (HelloWorld2) context.getBean("hellobean2");
        obj2.print();
    }
}
